<template>
  <div class="home">
    <van-empty
      description="报备成功请截图二维码"
    >
    <!-- ，如有随行人请点击下方“添加随行人”按钮进行添加 -->
    </van-empty>
    <div style="padding-left: 24%; padding-right: 24%">
      <van-image
        width="10rem"
        height="10rem"
        fit="cover"
        position="left"
        :src="baseImg"
      />
    </div>

    <div style="margin: 16px; display: flex">
      <!-- <van-button block type="info" @click="goToRest()">添加随行人</van-button> -->
    </div>
  </div>
</template>

<script>
import area from '@/libs/area.json'
import { helpUserQrCode } from '@/api/self/help'
import { Toast, Dialog } from 'vant'
export default {
  data () {
    return {
      minDate: new Date(1900, 0, 1),
      showDate: false, // 选择生日
      baseImg: '',
      forArea: area,
      Province: '', // 省
      city: '', // 市
      area: '', // 区
      title: '省', // 标题省  市  区
      show: false, // 城市选择
      pickerShow: false, // 时间选择
      isGetArea: false, // 是否已经获取上车省市区
      showCertificate: false, // 证件类型
      phoneRules:
        /^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|14[57])[0-9]{8}$/,
      postData: []
    }
  },
  mounted () {
    let data = { 'id': this.$route.query.id }
    console.log('data======', data)
    helpUserQrCode(data).then((res) => {
      Toast.clear()
      if (res.data.errcode === 0) {
        this.baseImg = res.data.data
        console.log(this.baseImg)
      } else {
        Toast.fail(res.data.msg)
      }
    })
  },
  methods: {

    goToRest () {
      this.$router.push({ name: 'selfhelp', query: { id: this.$route.query.id, code: this.$route.query.code } })
    }

  }
}
</script>
<style lang="less" scoped>
.upload-img-5 {
  margin: 5px 0 90px 0;
}
.upload-img-1 {
  margin: 5px 0 15px 0;
}
.home {
  //   background: url('../../assets/images/smtb.jpg')no-repeat;

  img {
    width: 100%;
  }
  .dialog-container {
    height: 70vh;
    overflow-y: auto;
  }
  .get-area {
    width: 100%;
    padding: 0 0.8rem;
    font-size: 0.747rem;
    color: #fff;
    background-color: #1989fa;
    border: 0.053rem solid #1989fa;
    height: 2.347rem;
    line-height: 2.347rem;
    text-align: center;
    border-radius: 0.107rem;
    cursor: pointer;
    box-sizing: border-box;
    margin-right: 10px;
  }
  /deep/.van-field__label {
    width: 8em;
  }
  /deep/.van-field__error-message {
    text-align: right;
  }
  .title {
    // font-size: 28px;
    text-indent: 20px;
    padding: 50px 0 20px;
  }
  .container {
    width: 90%;
    height: 80vh;
    overflow-y: auto;
    border: 1px solid #adadad;
    margin: auto;
    .item {
      margin: 10px;
    }
  }
}
.up-and-down {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f1f3f4;
  height: 80px;
  color: #333;
}
// .home .blue {
//   background-color: transparent;
// }
// .home .van-cell{
//  background-color: transparent;
// }
</style>
